/*
	该文件专门为Count组件生成action对象
*/
import {INCREMENT,DECREMENT} from "./constant";

// 定义加的action
export const createIncrementAction = (data)=>({type:INCREMENT,data})
// 定义减的action
export const createDecrementAction = (data)=>({type:DECREMENT,data})
// 定义同步的action
export const createIncrementAsyncAction = (data,time)=>{
    return (dispatch)=>{
        setTimeout(()=>{
            dispatch(createIncrementAction(data))
        },time)
    }
}
